import request from "@/utils/request";

// 获取区域列表
export function getAreaList(id) {
  return request({
    url: `/area/list/${id}`,
    method: "get"
  });
}
// 获取区域详情
export function getAreaDetail(id) {
  return request({
    url: `/area/${id}`,
    method: "get"
  });
}
// 添加区域
export function addArea(data) {
  return request({
    url: "/area",
    method: "post",
    data
  });
}
// 编辑区域
export function editArea(data) {
  return request({
    url: "/area",
    method: "put",
    data
  });
}

//获取地区 tree

export function getAreaTree() {
  return request({
    url: "/area/tree",
    method: "get"
  });
}
